s = "abccccdd"

s = list(s)
if len(set(s)) == len(s):
    print(1)
else:
    if (len(set(s)) - len(s)) % 2 == 0:
        print((len(s) - len(set(s))) * 2)
    else:
        print(len(s) - len(set(s)) * 2 + 1)
